void saveToLog() {
  FileWriter file;
  String writeString = year() + "/" + nf(month(), 2, 0) + "/" + nf(day(), 2, 0) + ","; //nf(month(), 2) +"/"+ nf(day(), 2)+"/"+year()+","+nf(hour(), 2)+":"+nf(minute(), 2)+","+saveString;
  writeString = writeString + nf(hour(), 2, 0) + ":" + nf(minute(), 2, 0) + ":" + nf(second(), 2, 0) + ",";
  writeString = writeString + saveString + "\n";
  try
  {
    file = new FileWriter(sketchPath + "/capture-stream-log.csv", true); // Boolean true tells to append
    file.write(writeString, 0, writeString.length()+1);  // (string, start char, end char)
    file.close();
    if (debug) { println("Wrote to capture-stream-log.csv file."); }
  }
  catch(Exception e) { println("Error: Can't open capture-stream-log.csv file!"); }
  
//  FileWriter file;
//  String minuteLog;
//  String writeString = year() + "/" + nf(month(), 2, 0) + "/" + nf(day(), 2, 0) + ",";
//  writeString = writeString + nf(hour(), 2, 0) + ":" + nf(minute(), 2, 0) + ":" + nf(second(), 2, 0) + ",";
//  writeString = writeString + saveString + "\n";
//  try {
//    file = new FileWriter(sketchPath + "/AMRUSB-1_Log.csv", true); // Boolean tells to append
//    file.write("\n" + minuteLog, 0, minuteLog.length()+1);  // (string, start char, end char)
//    file.close();
////    file = new FileWriter(sketchPath + "/capture-stream-log.csv", true);
////    file.write(writeString, 0, writeString.length() + 1);
////    file.close();
//  }
//  catch(Exception e) { 
//    println("Error: Can't open capture-stream-log.csv file!")
//  }
}

